/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nsip.components.ds.bi;

/**
 *
 * @author nico.rehwaldt
 */
public abstract class Metric {

    /**
     * Creates a new metric.
     */
    protected Metric() { }

    /**
     * Updates the value of this metric
     * @param value
     */
    public void update(double value) {}

    /**
     * Returns the possibly computed value of this metric
     * @return
     */
    public abstract double value();

    @Override
    public String toString() {
        return Double.toString(Math.ceil(value() * 1000) / 1000);
    }
}
